package it.koutifaris.travianmap.view.villagedetails;

import it.koutifaris.travianmap.model.Player;
import it.koutifaris.travianmap.view.playerdetails.PlayerDetailsActivity;
import android.support.v4.app.DialogFragment;
import android.view.View;
import android.view.View.OnClickListener;

class OnPlayerClickListener implements OnClickListener {

	private final Player player;
	private final DialogFragment dialog;

	public OnPlayerClickListener(Player player, DialogFragment dialog) {
		this.player = player;
		this.dialog = dialog;
	}

	@Override
	public void onClick(View v) {
		dialog.dismiss();
		PlayerDetailsActivity.startActivity(player);
	}

}
